package com.wanmait.baohan.service.Impl;

import com.github.pagehelper.PageInfo;
import com.wanmait.baohan.mapper.ProvincesCityMapper;
import com.wanmait.baohan.pojo.ProvincesCity;
import com.wanmait.baohan.service.ProvincesCityService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
@Service
@Transactional(rollbackFor = Exception.class)
public class ProvincesCityServiceImpl implements ProvincesCityService {
    @Resource
    private ProvincesCityMapper provincesCityMapper;
    @Override
    public void insert(ProvincesCity object) {

    }

    @Override
    public void delete(Integer id) {

    }

    @Override
    public void delete(String ids) {

    }

    @Override
    public void update(ProvincesCity object) {

    }

    @Override
    public ProvincesCity findById(Integer id) {
        return null;
    }

    @Override
    public List<ProvincesCity> findAll() {
        return null;
    }

    @Override
    public List<ProvincesCity> findAll(ProvincesCity object) {
        return null;
    }

    @Override
    public PageInfo<ProvincesCity> findPage(int pageNum) {
        return null;
    }

    @Override
    public PageInfo<ProvincesCity> findPage() {
        return null;
    }

    @Override
    public PageInfo<ProvincesCity> findPage(int pageNum, ProvincesCity object) {
        return null;
    }

    @Override
    public PageInfo<ProvincesCity> findPage(ProvincesCity object) {
        return null;
    }

    @Override
    public List<ProvincesCity> findAllCity() { return provincesCityMapper.findAllCity(); }

    @Override
    public List<ProvincesCity> findAllProvince() {
        return provincesCityMapper.findAllProvince();
    }

    /**
     * hxn
     * @param code
     * @return
     * 通过选择的省获取下面的市
     */
    @Override
    public List<ProvincesCity> findCityByProvinceCode(String code) {
        return provincesCityMapper.findCityByProvinceCode(code);
    }

    /**
     * hxn
     * @param code
     * @return
     * 通过选择的市获取下面的区
     */
    @Override
    public List<ProvincesCity> findDistrictByCityCode(String code) {
        return provincesCityMapper.findDistrictByCityCode(code);
    }


}
